package com.showgood.util {
	/**
	 * 矩形
	 * @author bianpeng
	 */
	public class Rect extends Object {
		
		public var _x:int;
		public var _y:int;
		public var _w:int;
		public var _h:int;
		
		public function Rect(x:int = 0, y:int = 0, 
				w:int=0, h:int=0) {
			this._x = x; this._y = y;
			this._w = w; this._h = h;
		}
		public function toString():String {
			return [_x, _y, _w, _h].join(',');
		}
		public function isIn(x:int, y:int):Boolean {
			return x >= _x && x < _x + _w &&
				y >= _y && y < _y + _h;
		}
	}
}

